<template>
  <div style="padding: 10px 15px">
    <div class="filter-container">
      <el-input
        v-model="listQuery.title"
        placeholder="请输入前置机名称/区域id"
        style="width: 200px"
        class="filter-item"
        @keyup.enter.native="handleFilter"
      />
      <el-select
        v-model="form.cpnID"
        filterable
        clearable
        class="filter-item"
        :filter-method="cpnmatch"
        @clear="cpnmatch"
        placeholder="请选择企业"
      >
        <el-option
          v-for="item in cpnoptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
          <span v-html="item.label" />
        </el-option>
      </el-select>
      <el-select
        v-model="form.payChannel"
        clearable
        filterable
        class="filter-item"
        placeholder="请选择支付通道"
        style="width: 260px"
        :filter-method="channelmatch"
        @clear="channelmatch"
      >
        <el-option
          v-for="item in paytychanneloptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
          <span v-html="item.label" />
        </el-option>
      </el-select>
     <!--
       <el-select v-model="Heartbeattyp" placeholder="请选择运行状态"    class="filter-item">
        <el-option
          v-for="item in HeartbeatDoptions"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
     -->
      <el-button
        class="filter-item seachbttn"
        type="primary"
        icon="el-icon-search"
        @click="handleFilter"
        >查询</el-button
      >
      <el-button
        class="filter-item seachbttn"
        type="primary"
        @click="clearilter"
      >
        清空
      </el-button>
    </div>
    <div
      class="filter_fenge"
      style="border: none; border-top: 1px solid #d1ddeb"
    />
    <div class="filter-container">
      <el-button
        v-if="Jurisdiction('添加')"
        class="filter-item bttnleft"
        style="margin-left: 10px"
        type="primary"
        icon="el-icon-edit"
        @click="handleCreate"
        >新增</el-button
      >
      <el-button
        v-if="Jurisdiction('删除')"
        class="filter-item"
        type="danger"
        icon="el-icon-delete"
        @click="deleteClick()"
        >删除</el-button
      >
    </div>
    <!--table-->
    <el-table
      ref="multipleTable"
      v-loading="listLoading"
      :data="CpnactmchinrcdData"
      fit
      highlight-current-row
      style="width: 100%"
      stripe
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55" />
      <el-table-column label="企业名称" align="left" min-width="180px">
        <template slot-scope="{ row }">
          <span>{{ row.cpnIDStr }}</span>
        </template>
      </el-table-column>

      <el-table-column label="门店名称" align="left" width="200px">
        <template slot-scope="{ row }">
          <span v-if="row.orgIDStr.length <= 16">{{ row.orgIDStr }}</span>
          <span v-if="row.orgIDStr.length > 16" :title="row.orgIDStr"
            >{{ row.orgIDStr.substring(0, 16) }}...</span
          >
        </template>
      </el-table-column>

      <el-table-column label="前置机名称" align="left" min-width="300px">
        <template slot-scope="{ row }">
          <span>{{ row.alisNme }}</span>
        </template>
      </el-table-column>

      <el-table-column label="区域代码" align="right" min-width="88px">
        <template slot-scope="{ row }">
          <span>{{ row.port }}</span>
        </template>
      </el-table-column>
      <el-table-column label="版本" align="left" min-width="80px">
        <template slot-scope="{ row }">
          <span>{{ row.version }}</span>
        </template>
      </el-table-column>

      <el-table-column label="操作人" align="left" min-width="80px">
        <template slot-scope="{ row }">
          <span>{{ row.operation }}</span>
        </template>
      </el-table-column>

      <el-table-column label="运行状态" align="left" min-width="90px">
        <template slot-scope="{ row }">
          <span v-if="row.heartbeat == 0" class="green">正常</span>
          <span v-if="row.heartbeat == 1" class="red">异常</span>
          <span v-if="row.heartbeat == 2" class="red">未上报</span>
        </template>
      </el-table-column>
      <el-table-column
        label="更新时间"
        align="right"
        min-width="130px"
      >
        <template slot-scope="{ row }">
          <span>{{ row.dtStr }}</span>
        </template>
      </el-table-column>

      <el-table-column fixed="right" label="操作" width="200">
        <template slot-scope="scope">
          <el-button
            v-if="Jurisdiction('编辑')"
            type="primary"
            size="mini"
            @click="handleClick(scope.row)"
            >编辑</el-button
          >
          <el-button
            v-if="Jurisdiction('删除')"
            type="danger"
            size="mini"
            @click="deleteClick(scope.row)"
            >删除</el-button
          >
          
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="listQuery.total > 0"
      :total="listQuery.total"
      :page.sync="listQuery.page"
      :limit.sync="listQuery.limit"
      @pagination="fetchData(this)"
    />

    <!--table -->
    <!--弹出层 模块-->
    <el-dialog
      :visible.sync="dialogFormVisible"
      width="60%"
      :before-close="handleClose"
      :show-close="false"
      class="cpnpymchinRct"
    >
      <el-form :model="form" :inline="true" label-position="right">
        <el-steps :active="active" finish-status="success">
          <el-step title="前置机配置基础信息" />
          <el-step title="选择账户" />
          <el-step title="确认新增" />
        </el-steps>

        <div :class="{ divshow: divid == 0, divnone: divid != 0 }">
          <div class="first_title">前置机配置基础信息</div>
          <div>
            <el-form-item style="display: none">
              <el-input v-model="form.id" />
            </el-form-item>

            <el-form-item
              label="所属企业"
              prop="cpnID"
              :rules="[
                { required: true, message: '企业不能为空', trigger: 'change' },
              ]"
            >
              <el-select
                v-model="form.cpnID"
                filterable
                class="filter-item"
                placeholder="请选择企业"
                :filter-method="cpnmatch"
                @change="CpnselectFn($event)"
                @clear="cpnmatch"
              >
                <el-option
                  v-for="item in cpnoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                  <span v-html="item.label" />
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item
              label="所属版本"
              prop="pyrcdid"
              :rules="[
                {
                  required: true,
                  message: '所属版本不能为空',
                  trigger: 'change',
                },
              ]"
            >
              <el-select
                v-model="form.pyrcdid"
                class="filter-item"
                @change="pyrdselectFn($event)"
              >
                <el-option
                  v-for="item in pyrcdoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                  <span v-html="item.label" />
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              label="前置机名称"
              prop="alisNme"
              :rules="{
                required: true,
                message: '前置机名称不能为空',
                trigger: 'blur',
              }"
            >
              <el-input v-model="form.alisNme" />
            </el-form-item>

            <el-form-item label="区域代码">
              <el-input v-model="form.port" style="width: 202px" />
            </el-form-item>
            <el-form-item label="地理位置">
              <el-input v-model="form.Addr" style="width: 520px" />
            </el-form-item>

            <div class="seach_org">
              <div class="seach_org_left">
                <div>
                  <span style="color: #ff4949">*</span>
                  选择门店
                </div>
                <div class="seach_org_left_second">
                  <el-input
                    v-model="listQueryOrg.title"
                    placeholder="搜索门店/门店代码"
                    style="width: 200px"
                    class="filter-item"
                  />
                  <el-button
                    class="filter-item"
                    type="primary"
                    icon="el-icon-search"
                    @click="handleFilterOrg"
                    >查询</el-button
                  >
                  <div class="select_all">
                    <el-checkbox v-model="radio" @change="select_allChange"
                      >全选/反选</el-checkbox
                    >
                  </div>
                  <div v-loading="cpnorgLoading" class="cpnorgdata_div">
                    <el-checkbox-group
                      v-show="cpnorgData.length > 0"
                      v-model="selectOrgs"
                    >
                      <el-checkbox
                        v-for="org in cpnorgData"
                        :key="org.orgID"
                        :label="'[' + org.orgID + ']' + org.name"
                      />
                    </el-checkbox-group>
                    <div v-show="cpnorgData.length <= 0" class="not_Data">
                      暂无数据
                    </div>
                  </div>
                </div>

                <pagination
                  v-show="listQueryOrg.total > 0"
                  :total="listQueryOrg.total"
                  :page.sync="listQueryOrg.page"
                  :limit.sync="listQueryOrg.limit"
                  @pagination="fetchDataOrg(this)"
                />
              </div>
              <div class="seach_org_right">
                <div>
                  已选择门店<span class="clear_all" @click="clearallorg"
                    >清空</span
                  >
                </div>
                <div class="seach_org_right_second">
                  <div
                    v-for="sectorg in selectOrgs"
                    :key="sectorg"
                    class="select_org"
                  >
                    {{ sectorg }}
                    <img
                      src="@/assets/org_close.png"
                      class="orgclose"
                      @click="org_close(sectorg)"
                    />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!--选择账户-->
        <div :class="{ divshow: divid == 1, divnone: divid != 1 }">
          <div class="first_title">选择账户</div>
          <div class="seach_org">
            <div class="seach_org_left">
              <div>选择账户</div>
              <div class="seach_org_left_second2">
                <el-select
                  v-model="form.payChannel"
                  clearable
                  filterable
                  class="filter-item"
                  placeholder="请选择支付通道"
                  style="width: 260px"
                >
                  <el-option
                    v-for="item in paytychanneloptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                    <span v-html="item.label" />
                  </el-option>
                </el-select>

                <el-select
                  v-model="form.payTyp"
                  clearable
                  class="filter-item"
                  placeholder="请选择支付方式"
                >
                  <el-option
                    v-for="item in paytypeoptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                    <span v-html="item.label" />
                  </el-option>
                </el-select>
                <el-button
                  class="filter-item"
                  type="primary"
                  icon="el-icon-search"
                  @click="handleFilterAct"
                  >查询</el-button
                >
                <div v-loading="cpnorgLoading" class="cpnorgdata_div">
                  <el-table
                    ref="multipleTable2"
                    v-loading="listLoading"
                    :data="CpnActCfgInfos"
                    :total="10"
                    style="width: 100%"
                    @selection-change="handleSelectionChangeAct"
                  >
                    <el-table-column type="selection" width="55" />
                    <el-table-column label="账户" align="left" width="400px">
                      <template slot-scope="{ row }">
                        <span>{{ row.alisNme }}</span>
                      </template>
                    </el-table-column>

                    <el-table-column
                      label="方式-渠道"
                      align="left"
                      min-width="110px"
                    >
                      <template slot-scope="{ row }">
                        <span>{{ row.payTypStr }}</span>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </div>

              <pagination
                v-show="listQueryAct.total > 0"
                :total="listQueryAct.total"
                :page.sync="listQueryAct.page"
                :limit.sync="listQueryAct.limit"
                @pagination="fetchDataAct(this)"
              />
            </div>
            <div class="seach_org_right">
              <div>
                已选择账户<span class="clear_all" @click="clearallact"
                  >清空</span
                >
              </div>
              <div class="seach_org_right_second2">
                <div
                  v-for="sectact in SecmultipleSelectionAct"
                  :key="sectact.id"
                  class="select_org"
                  :title="sectact.alisNme"
                >
                  {{ sectact.alisNme }}
                  <img
                    src="@/assets/org_close.png"
                    class="orgclose"
                    @click="act_close(sectact)"
                  />
                </div>
              </div>
            </div>
          </div>
        </div>
        <!--预览确认新增-->
        <div :class="{ divshow: divid == 2, divnone: divid != 2 }">
          <div class="first_title">预览确认</div>
          <div>
            <div class="infocontent_line">
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">企业：</span>
                <span class="infocontent_item_content">{{
                  this.form.cpnIDStr
                }}</span>
              </div>
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">版本：</span>
                <span class="infocontent_item_content">{{
                  this.form.version
                }}</span>
              </div>
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">前置机名称：</span>
                <span class="infocontent_item_content">{{
                  this.form.alisNme
                }}</span>
              </div>
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">区域代码：</span>
                <span class="infocontent_item_content">{{
                  this.form.port
                }}</span>
              </div>
            </div>
            <div class="infocontent_line">
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">地理位置：</span>
                <span class="infocontent_item_content">{{
                  this.form.Addr
                }}</span>
              </div>
            </div>
            <div class="infocontent_line">
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">通用门店：</span>
                <span class="infocontent_item_content">
                  <span v-for="sectorg in selectOrgs" :key="sectorg"
                    >{{ sectorg }}、</span
                  >
                </span>
              </div>
            </div>
            <div class="infocontent_line">
              <div class="infocontent_item_1">
                <span class="infocontent_item_name">适用账户：</span>
                <span class="infocontent_item_content">
                  <span
                    v-for="sectact in SecmultipleSelectionAct"
                    :key="sectact.id"
                    :title="sectact.alisNme"
                    >{{ sectact.alisNme }}、</span
                  ></span
                >
              </div>
            </div>
          </div>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button v-if="divid != 0" style="float: left" @click="prv"
          >上一步</el-button
        >
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button v-if="divid < 2" type="primary" @click="next()"
          >下一步</el-button
        >
        <el-button v-if="divid == 2" type="primary" @click="saveForm()"
          >确认保存</el-button
        >
      </span>
    </el-dialog>

    <!--详情-->
    <el-dialog title="详情" :visible.sync="dialogdetailsVisible" width="55%">
      <el-form :model="details_form" :inline="true" label-position="right" />
    </el-dialog>

    <!--测试支付-->
    <el-dialog
      title="测试支付"
      :visible.sync="paydialogFormVisible"
      width="60%"
      :before-close="handleClose"
      :show-close="false"
    >
      <el-form :model="pay_form" :inline="true" label-position="right">
        <el-form-item label="付款码">
          <el-input
            v-model="pay_form.authcode"
            placeholder="支付时,请输入付款码"
          />
        </el-form-item>

        <el-form-item label="支付通道">
          <el-select
            v-model="pay_form.paychannelid"
            clearable
            filterable
            class="filter-item"
            placeholder="请选择支付通道"
          >
            <el-option
              v-for="item in paytychanneloptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
              <span v-html="item.label" />
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="支付方式">
          <el-select
            v-model="pay_form.paytypeid"
            clearable
            class="filter-item"
            placeholder="请选择支付方式"
          >
            <el-option
              v-for="item in paytypeoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
              <span v-html="item.label" />
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="门店代码">
          <el-input
            v-model="pay_form.orgID"
            placeholder="特殊通道支付时,请输入(如门店)"
          />
        </el-form-item>
        <el-form-item label="收银机号">
          <el-input
            v-model="pay_form.rec_device"
            placeholder="特殊通道支付时,请输入(如莱米)"
          />
        </el-form-item>
        <el-form-item label="支付订单号">
          <el-input v-model="pay_form.order_id" placeholder="退款时,请输入" />
        </el-form-item>
        <el-form-item label="第三方平台订单号" style="width: 30%">
          <el-input v-model="pay_form.pay_nd" placeholder="退款时,请输入" />
        </el-form-item>
        <el-button type="primary" @click="savePay">立即支付</el-button>
        <el-button type="primary" @click="saverefund">发起退款</el-button>
        <el-form-item style="width: 100%">
          <el-card class="box-card" shadow="never">
            <div slot="header" class="clearfix">
              <span>响应结果</span>
            </div>
            <div class="text item">
              <xmp>
                <div
                v-text="pay_form.formatData"
                style="color: #1682e6;font-size: 14px;"
                v-loading="payloading"
                element-loading-text="Loading"
                element-loading-spinner="el-icon-loading"
                />
              </xmp>
            </div>
          </el-card>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="paydialogFormVisible = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import { AjaxToken, TipConfirm } from "@/api/common";
import { AjaxTokenNotasync } from "@/api/common";
import { SelectAjax } from "@/api/common";
import { Jurisdiction } from "@/api/common";
import PinYinMatch from "pinyin-match";
import sessionStorage from "@/api/Storage";
import "url-search-params-polyfill";
export default {
  name: "CpnPyMchinRct",
  components: { Pagination },
  data() {
    return {
      aaa: "",
      typ: 0,
      active: 0,
      divid: 0,
      radio: false,
      formloading: false,
      cpnorgLoading: false,
      multipleSelection: [],
      multipleSelectionAct: [],
      SecmultipleSelectionAct: [],
      cpnoptions: [],
      cpnorgData: [],
      selectActDTOs: [],
      orgoptions: [],
      CpnActCfgInfos: [],
      pyrcdoptions: [],
      formLabelWidth: "120px",
      CpnactmchinrcdData: null,
      paytypeoptions: [],
      paytychanneloptions: [],
      selectOrgs: [],
      HeartbeatDoptions: [
        {
          value: "0",
          label: "正常",
        },
        {
          value: "1",
          label: "异常",
        },
        {
          value: "2",
          label: "未上报",
        },
      ],
      Heartbeattyp: null,
      listQuery: {
        title: "",
        total: 0,
        page: 1,
        limit: 10,
      },
      listQueryOrg: {
        title: "",
        total: 0,
        page: 1,
        limit: 30,
      },
      listQueryAct: {
        title: "",
        total: 0,
        page: 1,
        limit: 10,
      },
      listLoading: true,
      payloading: false,
      dialogFormVisible: false,
      dialogdetailsVisible: false,
      paydialogFormVisible: false,
      dialogStatus: "",
      textMap: {
        update: "修改",
        create: "添加",
      },
      form: {
        id: "",
        cpnID: "",
        cpnIDStr: "",
        orgID: "",
        pyMchinID: "",
        dt: "",
        port: "",
        macAddr: "",
        operation: "",
        isEnable: "",
        payTyp: "",
        payChannel: "",
        alisNme: "",
        actCfg: "",
        act: "",
        actNme: "",
        isDeleted: "",
        pyrcdid: "",
        Addr: "",
        orgIDs: [],
        Act: "",
        version: "",
      },
      pay_form: {
        cpnID: "",
        port: "",
        authcode: "",
        orgID: "",
        auth_type: "",
        rec_device: "",
        pay_nd: "",
        order_id: "",
        formatData: "",
        paytypeid: "",
        paychannelid: "",
      },
      details_form: {
        iD: "",
        cpnID: "",
        orgID: "",
        pyMchinID: "",
        dt: "",
        port: "",
        macAddr: "",
        operation: "",
        isEnable: "",
        payTyp: "",
        payChannel: "",
        alisNme: "",
        actCfg: "",
        act: "",
        actNme: "",
        isDeleted: "",
      },
    };
  },
  created() {},
  mounted() {
    this.fetchData();
    backstage.GeCpntListItems(this);
    backstage.GetPyChannelSelectListItems(this);
  },
  activated() {
    this.fetchData();
    backstage.GeCpntListItems(this);
    backstage.GetPyChannelSelectListItems(this);
  },
  methods: {
    channelmatch(val) {
      if (val) {
        let result = [];
        this.paytychanneloptions.forEach((item) => {
          let matchRes = PinYinMatch.match(item.label, val);
          if (matchRes) {
            result.push(item);
          }
        });
        this.paytychanneloptions = result;
      } else {
        this.paytychanneloptions = backstage.GetPyChannelSelectListItems(this);
      }
    },
    GetPyChannelSelectListItems: function (thisobj) {
      SelectAjax(
        "GetPyChannelSelectListItems?val=",
        function (response) {
          // console.log(response);
          var body = response.data;
          thisobj.paytychanneloptions = [];
          body.data.forEach((element) => {
            thisobj.paytychanneloptions.push({
              value: element.value,
              label: element.text,
            });
          });
        },
        function (error) {}
      );
    },
    cpnmatch(val) {
      debugger;
      if (val) {
        let result = [];
        this.cpnoptions.forEach((item) => {
          let matchRes = PinYinMatch.match(item.label, val);
          if (matchRes) {
            result.push(item);
          }
        });
        this.cpnoptions = result;
      } else {
        this.cpnid = "";
        this.cpnoptions = backstage.GeCpntListItems(this);
      }
    },
    clearallorg() {
      this.selectOrgs = [];
      this.radio = false;
    },
    clearallact() {
      this.SecmultipleSelectionAct = [];
      this.$refs.multipleTable2.clearSelection();
    },
    select_allChange() {
      if (!this.radio) {
        var newselectOrgs = [];
        this.selectOrgs.forEach((a) => {
          var isadd = true;
          this.cpnorgData.forEach((b) => {
            var org = "[" + b.orgID + "]" + b.name + "";
            if (a == org) {
              isadd = false;
            }
          });
          if (isadd) {
            newselectOrgs.push(a);
          }
        });
        this.selectOrgs = newselectOrgs;
      } else {
        this.cpnorgData.forEach((org) => {
          var isadd = true;
          var org = "[" + org.orgID + "]" + org.name + "";
          this.selectOrgs.forEach((b) => {
            if (org == b) {
              isadd = false;
            }
          });
          if (isadd) {
            this.selectOrgs.push(org);
          }
        });
      }
    },
    prv() {
      this.active = this.active - 1;
      this.divid = this.active;
    },
    next() {
      if (this.form.cpnID == "" || this.form.cpnID == undefined) {
        this.$message({
          showClose: true,
          message: "请选择企业",
          type: "error",
        });
        return;
      }
      // if (this.form.Addr == '' || this.form.Addr == undefined) {
      //   this.$message({
      //     showClose: true,
      //     message: '请填写地理位置',
      //     type: 'error'
      //   })
      //   return
      // }
      if (this.form.pyrcdid == "" || this.form.pyrcdid == undefined) {
        this.$message({
          showClose: true,
          message: "请选择版本",
          type: "error",
        });
        return;
      }
      if (this.form.alisNme == "" || this.form.alisNme == undefined) {
        this.$message({
          showClose: true,
          message: "请填写前置机名称",
          type: "error",
        });
        return;
      }
      if (this.form.port == "" || this.form.port == undefined) {
        this.$message({
          showClose: true,
          message: "请填写区域代码",
          type: "error",
        });
        return;
      }
      if (this.selectOrgs.length <= 0 || this.selectOrgs == undefined) {
        this.$message({
          showClose: true,
          message: "请选择门店",
          type: "error",
        });
        return;
      }
      if (this.active == 1) {
        if (this.SecmultipleSelectionAct.length <= 0) {
          this.$message({
            showClose: true,
            message: "请至少选择一个账户",
            type: "error",
          });
          return;
        } else {
          if (this.active++ > 2) {
            this.active = 0;
          }
          this.divid = this.active;
        }
      } else {
        if (this.active++ > 2) {
          this.active = 0;
        }
        this.divid = this.active;
      }
    },
    org_close(item) {
      var newselectOrgs = [];
      this.selectOrgs.forEach((element) => {
        if (element != item) {
          newselectOrgs.push(element);
        }
      });
      this.selectOrgs = newselectOrgs;
    },
    act_close(item) {
      var oldact = this.multipleSelectionAct;
      this.$refs.multipleTable2.clearSelection();
      oldact.forEach((element) => {
        if (element.id != item.id) {
          this.$refs.multipleTable2.toggleRowSelection(element);
        }
      });
    },
    toggleSelection(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.multipleTable2.toggleRowSelection(row);
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable2.clearSelection();
        this.$refs.multipleTable.toggleRowSelection(row);
      }
    },
    handleClose() {},
    EnableIsEmrgncy(e, row) {
      var params = new URLSearchParams();
      params.append("id", row.id);
      params.append("IsEmrgncy", e);
      var msg = "";
      if (e) {
        msg = "启用应急账户后,已关联的其他的账户将无法使用,请谨慎操作";
      } else {
        msg = "关闭应急账户后,将恢复之前已关联账户,请谨慎操作!";
      }
      this.$confirm(msg, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "success",
      })
        .then((a) => {
          this.listLoading = true;
          backstage.EnableIsEmrgncy(this, params);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
          this.fetchData();
        });
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    handleSelectionChangeAct(val) {
      val.forEach((element) => {
        var isadd = false;
        this.SecmultipleSelectionAct.forEach((a) => {
          if (element.id == a.id) {
            isadd = true;
          }
        });
        if (!isadd) {
          this.SecmultipleSelectionAct.push(element);
        }
      });
      var notacts = [];
      this.CpnActCfgInfos.forEach((cacf) => {
        var isadd = false;
        val.forEach((vale) => {
          if (vale.id == cacf.id) {
            isadd = true;
          }
        });
        if (!isadd) {
          notacts.push(cacf);
        }
      });
      this.multipleSelectionAct = val;
      var newSecmultipleSelectionAct = [];
      this.SecmultipleSelectionAct.forEach((a) => {
        var isadd = false;
        notacts.forEach((b) => {
          if (a.id == b.id) {
            isadd = true;
          }
        });
        if (!isadd) {
          newSecmultipleSelectionAct.push(a);
        }
      });
      this.SecmultipleSelectionAct = newSecmultipleSelectionAct;
    },
    Jurisdiction(moduleActionName) {
      return Jurisdiction(moduleActionName, this);
    },

    handleFilter(row) {
      this.listQuery.page = 1;
      this.fetchData();
    },
    clearilter(row) {
      this.listQuery.page = 1;
      this.listQuery.title = "";
      this.form = {
       id: "",
        cpnID: "",
        cpnIDStr: "",
        orgID: "",
        pyMchinID: "",
        dt: "",
        port: "",
        macAddr: "",
        operation: "",
        isEnable: "",
        payTyp: "",
        payChannel: "",
        alisNme: "",
        actCfg: "",
        act: "",
        actNme: "",
        isDeleted: "",
        pyrcdid: "",
        Addr: "",
        orgIDs: [],
        Act: "",
        version: "",
      };
      this.fetchData();
    },
    handleFilterOrg(row) {
      this.listQueryOrg.page = 1;
      this.fetchDataOrg();
    },
    handleFilterAct(row) {
      this.fetchDataAct();
    },
    // 新增
    handleCreate() {
      this.active = 0;
      this.divid = 0;
      this.dialogStatus = "create";
      this.multipleSelection = [];
      this.cpnorgData = [];
      this.selectActDTOs = [];
      this.orgoptions = [];
      this.CpnActCfgInfos = [];
      this.selectOrgs = [];
      this.multipleSelectionAct = [];
      this.SecmultipleSelectionAct = [];
      var a = backstage.randomNum(0, 9);
      var b = backstage.randomNum(0, 9);
      var c = backstage.randomNum(0, 9);
      var d = backstage.randomNum(0, 9);
      (this.form = {
        id: "",
        cpnID: "",
        orgID: "",
        pyMchinID: "",
        dt: "",
        port: a + b + c + d,
        macAddr: "",
        operation: "",
        isEnable: "",
        payTyp: "",
        payChannel: "",
        alisNme: "",
        actCfg: "",
        act: "",
        actNme: "",
        isDeleted: "",
        pyrcdid: "",
        Addr: "",
        orgIDs: [],
        Act: "",
        version: "",
      }),
        (this.dialogFormVisible = true);
      backstage.GetPymcverrcdSelectList(this);
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQueryAct.page +
          ',"rows":' +
          this.listQueryAct.limit +
          "}"
      );
      params.append("CpnID", "");
      params.append("PyMchinId", "");
      backstage.GetCpnActCfgInfos(this, params);
      backstage.GetPyChannelSelectListItems(this);
      backstage.GetPayTypeList(this);
    },
    // 编辑
    handleClick(row) {
      console.log("11111111111");
      console.log(row);
      this.active = 0;
      this.divid = 0;
      this.form.cpnID = row.cpnID;
      this.form.orgID = row.orgID;
      this.form.alisNme = row.alisNme;
      this.form.port = row.port;
      this.form.id = row.id;
      this.form.Addr = row.addr;
      this.form.pyrcdid = row.pyrcdid;
      this.dialogStatus = "edit";
      this.selectOrgs = row.checkOrg;
      this.form.cpnIDStr = row.cpnIDStr;
      this.form.version = row.version;
      this.selectActDTOs = [];
      this.CpnActCfgInfos = [];
      this.multipleSelectionAct = [];
      this.SecmultipleSelectionAct = [];
      this.fetchDataOrg();

      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQueryAct.page +
          ',"rows":' +
          this.listQueryAct.limit +
          "}"
      );
      params.append("CpnID", row.cpnID);
      params.append("PyMchinId", row.id);
      params.append("IsAll", true);
      backstage.GetCpnActCfgInfos2(this, params);
      this.listQueryAct.page = 1;
      this.listQueryAct.limit = 10;
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQueryAct.page +
          ',"rows":' +
          this.listQueryAct.limit +
          "}"
      );
      params.append("CpnID", row.cpnID);
      params.append("PyMchinId", row.id);
      
      backstage.GetCpnActCfgInfos(this, params);
      backstage.GetPyChannelSelectListItems(this);
      backstage.GetPayTypeList(this);
      backstage.GetPymcverrcdSelectList(this);
      this.dialogFormVisible = true;
    },
    payClick(row) {
      this.pay_form.cpnID = row.cpnID;
      this.pay_form.port = row.port;
      this.pay_form.orgID = row.orgID;
      this.pay_form.formatData = "";
      backstage.GetPayTypeList(this);
      backstage.GetPyChannelSelectListItems(this);
      this.paydialogFormVisible = true;
    },
    saveForm() {
      var multipleSelectionActs = this.SecmultipleSelectionAct;
      this.selectActDTOs = [];
      multipleSelectionActs.forEach((element) => {
        this.selectActDTOs.push({ ID: element.id, IsEnable: true });
      });
      if (this.selectActDTOs.length <= 0) {
        this.$message({
          showClose: true,
          message: "请至少选择一个账户",
          type: "error",
        });
        return;
      }
      if (this.selectOrgs.length <= 0 || this.selectOrgs == undefined) {
        this.$message({
          showClose: true,
          message: "请选择门店",
          type: "error",
        });
        return;
      }
      var params = new URLSearchParams();
      params.append("selectActDTOs", JSON.stringify(this.selectActDTOs));
      params.append("Port", this.form.port);
      params.append("CpnID", this.form.cpnID);
      params.append("AlisNme", this.form.alisNme);
      params.append("Addr", this.form.Addr);
      params.append("OrgID", JSON.stringify(this.selectOrgs));
      params.append("PyMchinId", this.form.id);
      params.append("IsEmrgncy", this.form.IsEmrgncy);
      params.append("pyrcdid", this.form.pyrcdid);
      if (this.form.id != "") {
        this.$prompt("", "请输入修改原因", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
        })
          .then(({ value }) => {
            const loading = this.$loading({
              lock: true,
              text: "Loading",
              spinner: "filter-container",
              background: "rgba(0, 0, 0, 0.7)",
            });
            params.append("operation", value);
            backstage.SaveCpnPyMchinRct(this, params, loading);
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "取消编辑",
            });
          });
      } else {
        const loading = this.$loading({
          lock: true,
          text: "Loading",
          spinner: "filter-container",
          background: "rgba(0, 0, 0, 0.7)",
        });
        backstage.SaveCpnPyMchinRct(this, params, loading);
      }
    },
    savePay() {
      this.payloading = true;
      var params = new URLSearchParams();
      params.append("CpnId", this.pay_form.cpnID);
      params.append("Area", this.pay_form.port);
      params.append("paytypeid", this.pay_form.paytypeid);
      params.append("paychannelid", this.pay_form.paychannelid);
      params.append("auth_code", this.pay_form.authcode);
      params.append("rec_device", this.pay_form.rec_device);
      params.append("organ", this.pay_form.orgID);
      backstage.CallPay(this, params);
    },
    saverefund() {
      this.payloading = true;
      var params = new URLSearchParams();
      params.append("CpnId", this.pay_form.cpnID);
      params.append("Area", this.pay_form.port);
      params.append("paytypeid", this.pay_form.paytypeid);
      params.append("paychannelid", this.pay_form.paychannelid);
      params.append("auth_code", this.pay_form.authcode);
      params.append("rec_device", this.pay_form.rec_device);
      params.append("organ", this.pay_form.orgID);
      params.append("order_id", this.pay_form.order_id);
      params.append("pay_nd", this.pay_form.pay_nd);
      backstage.CallPayRefund(this, params);
    },
    CpnselectFn(e) {
      this.selectActDTOs = [];
      this.selectOrgs = [];
      this.form.cpnIDStr = event.target.innerText;
      this.fetchDataOrg();
      this.fetchDataAct();
    },
    pyrdselectFn(e) {
      this.form.version = event.target.innerText;
    },

    fetchData() {
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQuery.page +
          ',"rows":' +
          this.listQuery.limit +
          "}"
      );
      params.append("AlisNme", this.listQuery.title);
      params.append("CpnID", this.form.cpnID);
      params.append("PyChnlID", this.form.payChannel);
      params.append("Heartbeat", this.Heartbeattyp);
      

      this.listLoading = true;
      backstage.GetCpnPyMchinRctLst(this, params);
    },
    fetchDataOrg() {
      this.radio = false;
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQueryOrg.page +
          ',"rows":' +
          this.listQueryOrg.limit +
          "}"
      );
      params.append("Name", this.listQueryOrg.title);
      params.append("CpnID", this.form.cpnID);
      this.cpnorgLoading = true;
      backstage.GetCpnOrgList(this, params);
    },
    fetchDataAct() {
      var params = new URLSearchParams();
      params.append(
        "Parms",
        '{"page":' +
          this.listQueryAct.page +
          ',"rows":' +
          this.listQueryAct.limit +
          "}"
      );
      params.append("CpnID", this.form.cpnID);
      params.append("PyMchinId", this.form.id);
      params.append("PyChnlID", this.form.payChannel);
      params.append("PyTypID", this.form.payTyp);
      params.append("Act", this.listQueryAct.title);

      backstage.GetCpnActCfgInfos(this, params);
    },
    deleteClick(row) {
      var multis = [];
      var params = new URLSearchParams();
      if (row == undefined || row == "") {
        var arr = this.multipleSelection;
        if (arr == undefined || arr.length <= 0) {
          this.$message({
            showClose: true,
            message: "请至少选中一行",
            type: "error",
          });
          return;
        } else {
          for (var i = 0; i < arr.length; i++) {
            multis.push(arr[i].id);
          }
          params.append("delds", JSON.stringify(multis));
        }
      } else {
        multis.push(row.id);
        params.append("delds", JSON.stringify(multis));
      }
      this.$confirm("确认删除吗？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "error",
      })
        .then((a) => {
          this.listLoading = true;
          backstage.DelCpnPyMchinRct(this, params);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
  },
};
// 后台事件
var backstage = {
  GetPayTypeList: function (thisobj) {
    SelectAjax(
      "GetPayTypeList?val=&pychanelid=" + thisobj.form.payChannel,
      function (response) {
        var body = response.data;
        thisobj.paytypeoptions = [];
        body.data.forEach((element) => {
          thisobj.paytypeoptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  GetPyChannelSelectListItems: function (thisobj) {
    SelectAjax(
      "GetPyChannelSelectListItems?val=",
      function (response) {
        var body = response.data;
        thisobj.paytychanneloptions = [];
        body.data.forEach((element) => {
          thisobj.paytychanneloptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  GetPyChannelSelectListItems: function (thisobj) {
    SelectAjax(
      "GetPyChannelSelectListItems?val=",
      function (response) {
        var body = response.data;
        thisobj.paytychanneloptions = [];
        body.data.forEach((element) => {
          thisobj.paytychanneloptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  // 获取Cpnactmchinrcd集合
  GetCpnPyMchinRctLst: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "GetCpnPyMchinRctLst",
      params,
      "post",
      function (res) {
        thisobj.listLoading = false;
        var body = res.data.data;
        thisobj.CpnactmchinrcdData = body.rows;
        thisobj.listQuery.page = body.page;
        thisobj.listQuery.total = body.records;
      },
      function (err) {}
    );
  },
  GeCpntListItems: function (thisobj) {
    SelectAjax(
      "GeCpntListItems?val=" + thisobj.cpnid + "",
      function (response) {
        var body = response.data;
        thisobj.cpnoptions = [];
        body.data.forEach((element) => {
          thisobj.cpnoptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  GetCpnActCfgInfos: function (thisobj, params) {
    AjaxTokenNotasync(
      thisobj,
      "GetCpnActCfgInfos",
      params,
      "post",
      function (res) {
        var body = res.data.data;
        if (res.data.data != null) {
          thisobj.CpnActCfgInfos = body.rows;
          thisobj.listQueryAct.page = body.page;
          thisobj.listQueryAct.total = body.records;
          var isselect = false;
          var newobt = thisobj.SecmultipleSelectionAct;
          setTimeout(function () {
            thisobj.CpnActCfgInfos.forEach((element) => {
              console.log(element,"/////",newobt)
              console.log(JSON.stringify(newobt))
              newobt.forEach((b) => {
                console.log(element.id , b.id)
                if (element.id == b.id) {
                  isselect = true;
                  console.log(element.id)
                  thisobj.$refs.multipleTable2.toggleRowSelection(element,true);
                }
               // console.log(element.id)
              });
            });
            if (!isselect) {
              thisobj.$refs.multipleTable2.clearSelection();
            }


          }, 500);
        } else {
          thisobj.CpnActCfgInfos = [];
          thisobj.$refs.multipleTable2.clearSelection();
        }
      },
      function (err) {}
    );
  },
  GetCpnActCfgInfos2: function (thisobj, params) {
    AjaxTokenNotasync(
      thisobj,
      "GetCpnActCfgInfos",
      params,
      "post",
      function (res) {
        var body = res.data.data;
        if (res.data.data != null) {
          var isselect = false;
          body.rows.forEach((element) => {
            if (element.isEnable) {
              isselect = true;
              thisobj.SecmultipleSelectionAct.push(element);
            }
          });
        } else {
          thisobj.CpnActCfgInfos = [];
          thisobj.$refs.multipleTable2.clearSelection();
        }
      },
      function (err) {}
    );
  },
  GeCpntListItems: function (thisobj) {
    SelectAjax(
      "GeCpntListItems?val=" + thisobj.form.cpnID + "",
      function (response) {
        var body = response.data;
        thisobj.cpnoptions = [];
        body.data.forEach((element) => {
          thisobj.cpnoptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  GetCpnOrgList: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "GetCpnOrgLst",
      params,
      "post",
      function (res) {
        thisobj.cpnorgLoading = false;
        var body = res.data.data;
        thisobj.cpnorgData = body.rows;
        thisobj.listQueryOrg.page = body.page;
        thisobj.listQueryOrg.total = body.records;
      },
      function (err) {
        thisobj.cpnorgLoading = false;
      }
    );
  },
  GetPymcverrcdSelectList: function (thisobj) {
    SelectAjax(
      "GetPymcverrcdSelectList?val=" + thisobj.form.pyrcdid + "&type=1",
      function (response) {
        var body = response.data;
        thisobj.pyrcdoptions = [];
        body.data.forEach((element) => {
          thisobj.pyrcdoptions.push({
            value: element.value,
            label: element.text,
          });
        });
      },
      function (error) {}
    );
  },
  SaveCpnPyMchinRct: function (thisobj, params, loading) {
    AjaxToken(
      thisobj,
      "SaveCpnPyMchinRct",
      params,
      "post",
      function (res) {
        loading.close();
        var body = res.data;
        if (body.success) {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "success",
            duration: 3000,
          });
          thisobj.fetchData();
          thisobj.dialogFormVisible = false;
          thisobj.formloading = false;
        } else {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "error",
          });
        }
      },
      function (err) {
        thisobj.dialogFormVisible = false;
        thisobj.formloading = false;
      }
    );
  },
  CallPay(thisobj, params) {
    AjaxToken(
      thisobj,
      "CallPay",
      params,
      "post",
      function (res) {
        var body = res.data;
        thisobj.payloading = false;
        thisobj.pay_form.formatData = backstage.parse_xml(body.message);
      },
      function (err) {}
    );
  },
  CallPayRefund(thisobj, params) {
    AjaxToken(
      thisobj,
      "CallPayRefund",
      params,
      "post",
      function (res) {
        var body = res.data;
        thisobj.payloading = false;
        thisobj.pay_form.formatData = backstage.parse_xml(body.message);
      },
      function (err) {}
    );
  },
  DelCpnPyMchinRct: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "DelCpnPyMchinRct",
      params,
      "post",
      function (res) {
        thisobj.listLoading = false;
        var body = res.data;
        if (body.success) {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "success",
            duration: 3000,
          });
          thisobj.fetchData();
          thisobj.dialogFormVisible = false;
        } else {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "error",
          });
        }
      },
      function (err) {}
    );
  },
  EnableIsEmrgncy: function (thisobj, params) {
    AjaxToken(
      thisobj,
      "EnableIsEmrgncy",
      params,
      "post",
      function (res) {
        thisobj.listLoading = false;
        var body = res.data;
        if (body.success) {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "success",
            duration: 3000,
          });
          thisobj.fetchData();
          thisobj.dialogFormVisible = false;
        } else {
          thisobj.$message({
            showClose: true,
            message: body.message,
            type: "error",
          });
        }
      },
      function (err) {}
    );
  },
  // 生成一个随机数
  randomNum: function (min, max) {
    return Math.floor(Math.random() * (max - min) + min).toString();
  },
  parse_xml: function (str) {
    var text = str;
    // 去掉多余的空格
    text =
      "\n" +
      text
        .replace(/(<\w+)(\s.*?>)/g, function ($0, name, props) {
          return name + " " + props.replace(/\s+(\w+=)/g, " $1");
        })
        .replace(/>\s*?</g, ">\n<");

    // 把注释编码
    text = text
      .replace(/\n/g, "\r")
      .replace(/<!--(.+?)-->/g, function ($0, text) {
        var ret = "<!--" + escape(text) + "-->";
        return ret;
      })
      .replace(/\r/g, "\n");

    // 调整格式
    var rgx =
      /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm;
    var nodeStack = [];
    var output = text.replace(
      rgx,
      function (
        $0,
        all,
        name,
        isBegin,
        isCloseFull1,
        isCloseFull2,
        isFull1,
        isFull2
      ) {
        var isClosed =
          isCloseFull1 == "/" ||
          isCloseFull2 == "/" ||
          isFull1 == "/" ||
          isFull2 == "/";
        var prefix = "";
        if (isBegin == "!") {
          prefix = getPrefix(nodeStack.length);
        } else {
          if (isBegin != "/") {
            prefix = getPrefix(nodeStack.length);
            if (!isClosed) {
              nodeStack.push(name);
            }
          } else {
            nodeStack.pop();
            prefix = getPrefix(nodeStack.length);
          }
        }
        var ret = "\n" + prefix + all;
        return ret;
      }
    );

    var prefixSpace = -1;
    var outputText = output.substring(1);

    // 把注释还原并解码，调格式
    outputText = outputText
      .replace(/\n/g, "\r")
      .replace(/(\s*)<!--(.+?)-->/g, function ($0, prefix, text) {
        if (prefix.charAt(0) == "\r") prefix = prefix.substring(1);
        text = unescape(text).replace(/\r/g, "\n");
        var ret =
          "\n" + prefix + "<!--" + text.replace(/^\s*/gm, prefix) + "-->";
        return ret;
      });
    // alert(outputText);
    outputText = outputText.replace(/\s+$/g, "").replace(/\r/g, "\r\n");
    return outputText;
  },
};
function getPrefix(prefixIndex) {
  var span = "    ";
  var output = [];
  for (var i = 0; i < prefixIndex; ++i) {
    output.push(span);
  }

  return output.join("");
}
</script>

<style lang="scss" scoped>
.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}

.box-card {
  margin-top: 10px;
}
.seach_org_left {
  float: left;
  width: 70%;
}
.seach_org {
  clear: both;
  overflow: hidden;
  width: 100%;
}
.seach_org_left_second {
  height: 300px;
  background: #ffffff;
  border: 1px solid #c3cad2;
  opacity: 1;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  overflow: auto;
}
.seach_org_left_second2 {
  height: 350px;
  background: #ffffff;
  border: 1px solid #c3cad2;
  opacity: 1;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  overflow: auto;
}
.seach_org_right {
  float: left;
  width: 30%;
  overflow: auto;
}
.seach_org_right_second {
  height: 300px;
  background: #ffffff;
  opacity: 1;
  border-radius: 4px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.seach_org_right_second2 {
  height: 300px;
  background: #ffffff;
  opacity: 1;
  border-radius: 4px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.select_org {
  background: #409eff;
  border: 1px solid #409eff;
  opacity: 1;
  border-radius: 18px;
  line-height: 18px;
  text-align: center;
  color: white;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  display: inline-block;
  padding: 5px 10px 5px 10px;
  margin: 10px 5px 0px 10px;
  position: relative;
}
.orgclose {
  position: absolute;
  top: -9px;
  right: -5px;
  cursor: pointer;
}
.cpnorgdata_div {
  width: 100%;
  height: 80%;
}
.not_Data {
  text-align: center;
  margin: 0 auto;
  position: relative;
  top: 50%;
  width: 100px;
  transform: translateY(-50%);
}

.infocontent_line {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
  text-align: left;
}
.infocontent_item_1 {
  font-size: 14px;
  width: 100%;
}
.infocontent_item_2 {
  font-size: 14px;
  width: 40%;
}
.infocontent_item_3 {
  font-size: 14px;
  width: 30%;
}
.infocontent_item_name {
  color: #959ea8;
}
.infocontent_item_content {
  color: #304156;
}
.select_all {
  float: right;
  display: inline-block;
  margin-right: 15px;
}
.clear_all {
  float: right;
  width: 28px;
  height: 14px;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  /* line-height: 24px; */
  color: #409eff;
  opacity: 1;
  cursor: pointer;
}
::v-deep.el-form-item--medium .el-form-item__content {
  width: 66% !important;
}
</style>
<style >
.cpnpymchinRct .el-dialog__header {
  padding: 0px;
  padding-bottom: 0px;
}
.cpnpymchinRct .el-checkbox__label {
  height: 14px;
  font-size: 14px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  line-height: 24px;
  color: #304156;
  opacity: 1;
}

.cpnorgdata_div .el-checkbox {
  margin-right: 130px;
  margin-top: 10px;
  width: 110px;
}
.seach_org_left .pagination-container {
  text-align: center;
  float: none;
  margin-top: 10px;
}
/**不显示总条数统计 */
.seach_org_left .pagination-container .el-pagination__total {
  display: none;
}

.cpnorgdata_div .el-table th.is-leaf,
.el-table td {
  border-bottom: none;
}
</style>
